
var request = require('request-promise');
const get = function (params) {
    console.log(params, 'params');
    let baseURL = params.url || '/'
    return request({
        url: `${baseURL}`,
        qs: {
            // per_page: params.per_page,
            // page: params.page,
        },
        rejectUnauthorized: false,
        resolveWithFullResponse: true,
        json: true
    }).then(function (res) {
        // console.log(res, 'res');
        return res;
    }).catch((error) => {
        console.log(error, 'error');
    })
}
module.exports = {
    get
}